import string
import random
with open('big.txt','w+',encoding="utf-8") as f:
    for i in range(88):
        str1=("".join(random.choices(string.ascii_lowercase,k=random.randint(1,100)))+"\n")
        f.write(str1)

with open('big.txt','r+',encoding="utf-8") as f:
    a=iter(f)    #得到文件的迭代器
    m=[ len(next(a)) for i in range (88)  ]   #得到每一行文本的长度(以列表方式返回)
print(max(m))     #返回列表中长度最大的值
